import {ref, computed} from 'vue'

const useStorageStore = defineStore('storageStore', () => {
    const storageValue = ref(0);//  文件已占用的存储空间大小
    const totalStorageValue = ref(0);

    const getterStorageValue = computed(() => {
        return storageValue.value;
    });
    const refreshStorage = () => {
        storageValue.value = 1000000;
        totalStorageValue.value = 20000000;
    };
    const getterTotalStorageValue = computed(() => {
        return totalStorageValue.value;
    });
    return {
        storageValue,
        getterStorageValue,
        refreshStorage,
        totalStorageValue,
        getterTotalStorageValue
    };
})

export default useStorageStore

